
Ext.onReady(function(){
	var url = 'http://feeds.feedburner.com/ajaxian';
	
	
	var load_xml_content_string = function(xmlData) {
		if (window.ActiveXObject) {
			//for IE
			xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
			xmlDoc.async="false";
			xmlDoc.loadXML(xmlData);
			return xmlDoc.xml;
		} else if (document.implementation && document.implementation.createDocument) {
			//for Mozila
            alert('mozilla');
            try{
            	return (new XMLSerializer()).serializeToString(xmlData);
            }catch(err){
            	alert(err);
            }
			
		}
	}
	var validateFeed = function(response, options){
		var a = response;
		
		alert(load_xml_content_string(response.responseXML));
	}
	
	var markInvalid = function(){
		var b = response;
		alert('invalid');
	}
	
	   
 
	Ext.Ajax.request({
		url: '/Wikitools/FeedProxy', //FeedProxy to reformatt feeds.
        params: {feed: url},
        success: validateFeed,
        failure: markInvalid,
        scope: this,
        feedUrl: url,
        method: 'GET'        
	})
	
	
	
});
